feat: 增强每日用量工具洞察与标题栏适配#43
Open
kts-kris wants to merge 5 commits into
Open
Conversation
5463f25 to
cf402d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本次追加修复:1.4.13
用户价值
修复 Codex 深色模式下,近 5 日趋势 hover 提示卡片里的日期和数值文字仍然跟随全局深色主题变成白色的问题。
这个问题会导致浅色 tooltip 背景上出现白色文字,用户在查看某一天的 Token 总量、请求次数和预估金额时几乎看不清。修复后,tooltip 作为浅色信息卡片独立使用深色文字,不再被 Codex 深色模式的全局前景色影响。
改动内容
codex-daily-token-usage更新到1.4.13。--color-token-foreground。index.json中的版本号和sha256。80f5efb88d1e2e0da5c22f229b65d08710460a7c258bdaea7b82a84071fb7576。验证
jq empty index.jsonnode --check scripts/codex-daily-token-usage.jsnode --check ../../outputs/codex-daily-token-usage.jsnode ../test-codex-daily-token-usage.jsgit diff --check1.4.13;rgba(255, 255, 255, 0.96);rgb(32, 32, 32);rgb(98, 102, 109);用户价值
这次更新让 Codex Daily Token Usage 从一个简单的 Token 计数器,升级为更接近“每日 Codex 工作用量报告”的工具。
用户不只可以看到今天消耗了多少 Token,还可以进一步理解:这些用量是普通对话带来的,还是来自命令执行、MCP、插件等工具辅助工作;同时,在用户还没有手工配置 Model 单价时,也能直接基于 OpenAI API Pricing 的 Standard 参考价看到预估成本。
这对用户的直接价值是:
原有改动内容
1. OpenAI 模型参考价预置
Standard参考价,单位为USD / 1M tokens。2. 工具调用洞察
function_callpayload、识别mcp__server__tool名称,并增加 DOM 兜底。3. 标题栏动态避让
pointer-events: none的非交互 header surface 不再占用布局空间。MutationObserver、ResizeObserver和requestAnimationFrame覆盖后出现按钮。4. 关联用量修复
conversationKey。说明和边界
Standard档,参考链接:https://developers.openai.com/api/docs/pricingCache writes、Batch、Flex、Priority、工具调用按次费用、Web search 额外调用费、容器分钟费不纳入当前模型 token 成本估算。exec_command。mcp-request/tools/call或mcp__server__tool这类函数名时被统计。